import request from '@/utils/request'

// 执行自动分配
export const executeMatch = (groupId) => {
    return request({
        url: '/system/allocate/execute',
        method: 'post',
        data: {
            groupId: groupId
        }
    })
}

// 获取空闲教师列表
export const getAvailableTeachers = (groupId) => {
    return request({
        url: '/system/allocate/available-teachers',
        method: 'get',
        params: { groupId }
    })
}

// 手动分配队伍给教师（实时分配）
export const manualAllocate = (data) => {
    return request({
        url: '/system/allocate/manual',
        method: 'post',
        data: data
    })
}

// 取消分配
export const cancelAllocate = (data) => {
    return request({
        url: '/system/allocate/cancel',
        method: 'post',
        data: data
    })
}
